<?php
$data['cur_parent_menu']='master';
$data['cur_selected_menu']='coac';
$this->load->view('template/menu_view',$data);
?>
<br/><br/><br/><br />
<div class="gridcenter" style="font-family: 'open sans',arial,sans-serif;font-size: 18px;font-weight:bold;color:#666666;">Tambah Kode Cabang (COA)</div>
<br />
<script>
	$(document).ready(function() {
	$("#form_add_coa_cabang").validate({
		rules: {
			kode_coa: "required"
		},
		messages: {
			kode_coa: " *Kode COA harus diisi"
		}});
	});
</script>
<div class="demo_jui datagrid gridcenter">
<form id="form_add_coa_cabang" method="post" action="<?php echo COAC ?>process_add_coa_cabang">
<table width="700">
	<tr>
		<td width="150">
			Kode Cabang (COA)
		</td>
		<td>
			: <input type="text" name="kode_coa"/>
		</td>
	</tr>
	<tr>
		<td>
			Nama Cabang
		</td>
		<td>: 
			<?php
				for($i=0;$i<count($daftar_cabang);$i++){
					$opt[$daftar_cabang[$i]['Kode']] = $daftar_cabang[$i]['Nama'];
				}
				echo form_dropdown('cabang', $opt);
			?>
		</td>
	</tr>
	<tr>
		<td colspan="2">
		&nbsp;
		</td>
	</tr>
	<tr>
		<td colspan="2">
			<input type="submit" value="Tambah"/>
			<input type="button" value="Kembali" onclick="location.href='<?php echo COAC ?>'"/>
		</td>
	</tr>
</table>
</form>
</div>